package cn.blnp.net.flowable.boot.bean.entity.mongos;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.flowable.engine.impl.persistence.entity.ExecutionEntity;
import org.flowable.engine.impl.persistence.entity.HistoricProcessInstanceEntity;
import org.flowable.variable.service.impl.persistence.entity.HistoricVariableInstanceEntity;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.MongoId;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <h3></h3>
 *
 * @author <a href="mailto:blnp.yibin@qq.com">lyb</a>
 * @version 1.0
 * @since 2025/6/24 16:57
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collation = "act_hi_procinst_mongo")
public class HistoricProcessInstanceDoc implements HistoricProcessInstanceEntity {

    private static final long serialVersionUID = 1L;

    @MongoId
    private String id;
    private int revision = 1;
    @Transient
    private boolean isInserted;
    @Transient
    private boolean isUpdated;
    @Transient
    private boolean isDeleted;
    @Transient
    private Object originalPersistentState;
    @Indexed
    private String processInstanceId;
    @Indexed
    private String processDefinitionId;
    @Indexed
    private Date startTime;
    private Date endTime;
    private ExecutionEntity executionEntity;

    public HistoricProcessInstanceDoc(ExecutionEntity processInstanceExecutionEntity) {
        this.executionEntity = processInstanceExecutionEntity;
        this.processInstanceId = processInstanceExecutionEntity.getProcessInstanceId();
        this.processDefinitionId = processInstanceExecutionEntity.getProcessDefinitionId();
        this.startTime = processInstanceExecutionEntity.getStartTime();
    }

    @Override
    public void setEndActivityId(String endActivityId) {

    }

    @Override
    public void setBusinessKey(String businessKey) {

    }

    @Override
    public void setBusinessStatus(String businessStatus) {

    }

    @Override
    public void setStartUserId(String startUserId) {

    }

    @Override
    public void setStartActivityId(String startUserId) {

    }

    @Override
    public void setSuperProcessInstanceId(String superProcessInstanceId) {

    }

    @Override
    public void setTenantId(String tenantId) {

    }

    @Override
    public void setName(String name) {

    }

    @Override
    public void setLocalizedName(String localizedName) {

    }

    @Override
    public void setDescription(String description) {

    }

    @Override
    public void setLocalizedDescription(String localizedDescription) {

    }

    @Override
    public void setProcessDefinitionKey(String processDefinitionKey) {

    }

    @Override
    public void setProcessDefinitionName(String processDefinitionName) {

    }

    @Override
    public void setProcessDefinitionVersion(Integer processDefinitionVersion) {

    }

    @Override
    public void setDeploymentId(String deploymentId) {

    }

    @Override
    public void setCallbackId(String callbackId) {

    }

    @Override
    public void setCallbackType(String callbackType) {

    }

    @Override
    public void setReferenceId(String referenceId) {

    }

    @Override
    public void setReferenceType(String referenceType) {

    }

    @Override
    public void setPropagatedStageInstanceId(String propagatedStageInstanceId) {

    }

    @Override
    public List<HistoricVariableInstanceEntity> getQueryVariables() {
        return null;
    }

    @Override
    public void setQueryVariables(List<HistoricVariableInstanceEntity> queryVariables) {

    }

    @Override
    public int getRevisionNext() {
        return 0;
    }

    @Override
    public String getBusinessKey() {
        return null;
    }

    @Override
    public String getBusinessStatus() {
        return null;
    }

    @Override
    public String getProcessDefinitionName() {
        return null;
    }

    @Override
    public String getProcessDefinitionKey() {
        return null;
    }

    @Override
    public Integer getProcessDefinitionVersion() {
        return null;
    }

    @Override
    public String getDeploymentId() {
        return null;
    }

    @Override
    public String getEndActivityId() {
        return null;
    }

    @Override
    public String getStartUserId() {
        return null;
    }

    @Override
    public String getStartActivityId() {
        return null;
    }

    @Override
    public String getSuperProcessInstanceId() {
        return null;
    }

    @Override
    public String getTenantId() {
        return null;
    }

    @Override
    public String getName() {
        return null;
    }

    @Override
    public String getDescription() {
        return null;
    }

    @Override
    public String getCallbackId() {
        return null;
    }

    @Override
    public String getCallbackType() {
        return null;
    }

    @Override
    public String getReferenceId() {
        return null;
    }

    @Override
    public String getReferenceType() {
        return null;
    }

    @Override
    public String getPropagatedStageInstanceId() {
        return null;
    }

    @Override
    public Map<String, Object> getProcessVariables() {
        return null;
    }

    @Override
    public void markEnded(String deleteReason, Date endTime) {

    }

    @Override
    public Long getDurationInMillis() {
        return null;
    }

    @Override
    public void setDurationInMillis(Long durationInMillis) {

    }

    @Override
    public String getDeleteReason() {
        return null;
    }

    @Override
    public void setDeleteReason(String deleteReason) {

    }

    @Override
    public String getIdPrefix() {
        return null;
    }

    @Override
    public Object getPersistentState() {
        return null;
    }
}
